package com.by.service.impl;

import com.by.bean.Dictionaries;
import com.by.mapper.DictionariesMapper;
import com.by.service.DictionariesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Map;

/**
 * @author HY
 * @version 1.0
 * @description
 * @date 2025/2/21
 * @since JDK21
 */
@Service
public class DictionariesServiceImpl implements DictionariesService {

    @Autowired
    DictionariesMapper dictionariesMapper;

    @Override
    public int save(Dictionaries dictionaries) {
        return dictionariesMapper.save(dictionaries);
    }

    @Override
    public List<Map> query(int pid) {
        List<Map> query = dictionariesMapper.query(pid);
        return query;
    }

    @Override
    public int update(Dictionaries dictionaries) {
        return dictionariesMapper.update(dictionaries);
    }

    @Override
    public int delete(int id) {
        return dictionariesMapper.delete(id);
    }
}
